<extend name="Public/base" />
<block name="body" >
	<div class="main-title">
		<h2>{$product['id']?'编辑':'新增'}消耗品</h2>
	</div>
    <form action="{:U('Subpro/newSubPro')}" enctype="application/x-www-form-urlencoded" method="POST"
            class="form-horizontal" name="edit_product" >
        <!--<div class="form-item">
            <label for="product-spu" class="item-label">商品编号</label>
            <div class="controls">
                <input id="product-spu" type="text" name="BIN" class="text input-large"   required />
            </div>
        </div>-->
        <div class="form-item">
            <label for="product-name" class="item-label">商品名称</label>
            <div class="controls">
                <input id="product-name" type="text" name="pname" class="text input-large" value="{$product.name}"  required/>
            </div>
        </div>
        <div class="form-item">
            <label for="product-name" class="item-label">商品规格</label>
            <div class="controls">
                <input id="product-spec" type="text" name="spec" class="text input-large" value="{$product.spec}"  required/>
            </div>
        </div>
        <div class="form-item am-g">
            <label class="item-label">换算公式</label>
            <span>每</span>
            <div class="" style="display: inline">
                <select name="mother_unit"  class="" style="">
                    <option value="提" >提</option>
                    <option value="箱" >箱</option>
                    <option value="包" >包</option>
                    <option value="把" >把</option>
                    <option value="个" >个</option>
                </select>
            </div>
            <span>包含</span>
            <input type="text" name="mother_to_son" class="text input" style="width:50px;" required/>
            <div class=""  style="display: inline">
                <select name="son_unit"  class="" style="">
                    <option value="个" selected="selected">个</option>
                </select>
            </div>
        </div>
        <div class="form-item">
            <label for="" class="item-label">商品分类</label>
            <div class="controls">
                <select name="classname"  class="search-input" style="height: 30px;width:130px">
                    <option value="消耗品" selected="selected">消耗品</option>
                </select>
            </div>
        </div>

        <div class="form-item">
            <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal" >确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
<block name="script">
    <script type="text/javascript" charset="utf-8">
        //导航高亮
        highlight_subnav('{:U('Subpro/manage')}');
    </script>
</block>